package com.ggy.tuibi.controller;

import com.ggy.tuibi.service.yuanqimoguicheng.YuanQiMoGuiChengService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/yuanqimoguicheng")
public class YuanQiMoGuiChengController {
    @Autowired
    private YuanQiMoGuiChengService yuanQiMoGuiCheng;

    @GetMapping("/enroll")
    public String enroll() {
        yuanQiMoGuiCheng.enroll();
        return "ok";
    }

    @GetMapping("/qiandao")
    public String signIn() {
        yuanQiMoGuiCheng.yuanQiQianDao();
        return "ok";
    }

    @GetMapping("/yifen")
    public String yifen(String jiqiname) {
        yuanQiMoGuiCheng.shangJiFenXia(jiqiname);
        return "ok";
    }

    @GetMapping("/qiehuan")
    public String qiehuan(String jiQiName, String mainUserId, String mainUserCode, String sourceUserId) {
        return yuanQiMoGuiCheng.qiehuan(jiQiName, mainUserId, mainUserCode, sourceUserId);
    }

    @GetMapping("/updateUser")
    public String updateUser() {
        yuanQiMoGuiCheng.updateUserCost();
        return "ok";
    }

}
